// 用户模块请求封装
import request from "@/utils/request";
// 用户登录
export const login = data => {
    return request({
        method: "POST",
        url: "/mp/v1_0/authorizations",
        // data用来设置post请求体
        data
    })
}
// 获取用户信息
export const getUserProfile = () => {

    
    return request({
        method: "GET",
        url: "/mp/v1_0/user/profile"
    })
}
// 修改用户信息
export const updateUser = () => {

}
// 修改用户头像,data必须传递FormData
export const updateUserPhoto = data => {
    return request({
        method: "PATCH",
        url: '/mp/v1_0/user/photo',
        data
    })
}
// 修改用户基本信息
export const updateUserProfile = data => {
    return request({
        method: "PATCH",
        url: '/mp/v1_0/user/profile',
        data
    })
}
